package com.rockcent.mall.lib.dto;

import com.rockcent.common.domain.DtoEntity;
import com.rockcent.common.utils.BigDecimalUtils;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * Created by DK on 16/11/8.
 */
public class MallFundFlowDto extends DtoEntity {

    /**
     * 平台订单号
     */
    private String mallOrderNum;

    /**
     * 总金额
     */
    private Double totalAmount;

    /**
     * 冻结金额
     */
    private Double frozen;

    /**
     * 可用金额
     */
    private Double availableAmount;

    /**
     * 备注
     */
    private String remark;

    /**
     * 操作金额
     */
    private Double operationAmount;

    /**
     * 交易方向 INCOME("收入", "+"), EXPEND("支出", "-")
     */
    private String transactionFlow;

    /**
     * 交易类型
     */
    private String transactionType;

    /**
     * 平台资金 id
     */
    private Long mallFundId;

    /**
     * 平台 id
     */
    private Long mallId;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String beginDate;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String endDate;

    /**
     * parent_id
     */
    private Long parentId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createDate;

    private String actualAmount;


    /**
     * 支付方式
     */
    private String paymentMethod;

    public String getMallOrderNum() {
        return mallOrderNum;
    }

    public void setMallOrderNum(String mallOrderNum) {
        this.mallOrderNum = mallOrderNum;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Double getTotalAmount() {
        return BigDecimalUtils.setScale(totalAmount);
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Double getFrozen() {
        return BigDecimalUtils.setScale(frozen);
    }

    public void setFrozen(Double frozen) {
        this.frozen = frozen;
    }

    public Double getAvailableAmount() {
        return BigDecimalUtils.setScale(availableAmount);
    }

    public void setAvailableAmount(Double availableAmount) {
        this.availableAmount = availableAmount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Double getOperationAmount() {
        return BigDecimalUtils.setScale(operationAmount);
    }

    public void setOperationAmount(Double operationAmount) {
        this.operationAmount = operationAmount;
    }

    public String getTransactionFlow() {
        return transactionFlow;
    }

    public void setTransactionFlow(String transactionFlow) {
        this.transactionFlow = transactionFlow;
    }

    public String getTransactionType() {
        return transactionType;
    }

    public void setTransactionType(String transactionType) {
        this.transactionType = transactionType;
    }

    public Long getMallFundId() {
        return mallFundId;
    }

    public void setMallFundId(Long mallFundId) {
        this.mallFundId = mallFundId;
    }

    public String getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(String beginDate) {
        this.beginDate = beginDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(String actualAmount) {
        this.actualAmount = actualAmount;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    @Override
    public String toString() {
        return "MallFundFlowDto{" +
                "mallOrderNum='" + mallOrderNum + '\'' +
                ", totalAmount=" + totalAmount +
                ", frozen=" + frozen +
                ", availableAmount=" + availableAmount +
                ", remark='" + remark + '\'' +
                ", operationAmount=" + operationAmount +
                ", transactionFlow='" + transactionFlow + '\'' +
                ", transactionType='" + transactionType + '\'' +
                ", mallFundId=" + mallFundId +
                ", mallId=" + mallId +
                ", beginDate='" + beginDate + '\'' +
                ", endDate='" + endDate + '\'' +
                ", parentId=" + parentId +
                ", createDate='" + createDate + '\'' +
                ", actualAmount='" + actualAmount + '\'' +
                ", paymentMethod='" + paymentMethod + '\'' +
                '}';
    }
}
